<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>

        //   转义字符  \

        console.log('\'');
        // console.log("'");


        // 正则中特殊的符号都需要使用转义字符

        //   正则中无法匹配  \


        var reg = /\?/;
        var reg = /\[/;
        var reg = /\*/;
        // var reg = /\\/;    // 无法匹配\
        console.log(reg.test('hi/\?'));

    </script>

</body>

</html>